home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / Games / InputSprocketPPTest / ISpTestMain.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  2.7 KB  |  112 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        ISpTestMain.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                xxx put dri here xxx
  13.  
  14.         Other Contact:        xxx put other contact here xxx
  15.  
  16.         Technology:            xxx put technology here xxx
  17.  
  18.     Writers:
  19.  
  20.         (BWS)    Brent Schorsch
  21.         (sjb)    Steve Bollinger
  22.  
  23.     Change History (most recent first):
  24.  
  25.          <5>     7/17/98    BWS        thrust button need was removed, so reduce need count
  26.          <4>     6/18/98    sjb        InputSprocket.h comes from <> place
  27. */
  28.  
  29. /*************************************************************************************
  30.  
  31. File:      ISpTestMain.h
  32.  
  33. Copyright © 1996, 1997, 1998 Apple Computer, Inc., All Rights Reserved
  34.  
  35.  
  36. You may incorporate this sample code into your applications without
  37. restriction, though the sample code has been provided "AS IS" and the
  38. responsibility for its operation is 100% yours.  However, what you are
  39. not permitted to do is to redistribute the source as "DSC Sample Code"
  40. after having made changes. If you're going to re-distribute the source,
  41. we require that you make it clear in the source that the code was
  42. descended from Apple Sample Code, but that you've made changes.
  43.  
  44. *************************************************************************************/
  45.  
  46.  
  47. #pragma once
  48.  
  49. #include <LApplication.h>
  50. #include <InputSprocket.h>
  51.  
  52. class    CPPStarterApp : public LApplication {
  53. public:
  54.                         CPPStarterApp();        // constructor registers all PPobs
  55.     virtual             ~CPPStarterApp();        // stub destructor
  56.     
  57.         // this overriding function performs application functions
  58.         
  59.     virtual Boolean        ObeyCommand(CommandT inCommand, void* ioParam);    
  60.     
  61.         // this overriding function returns the status of menu items
  62.         
  63.     virtual void        FindCommandStatus(CommandT inCommand,
  64.                             Boolean &outEnabled, Boolean &outUsesMark,
  65.                             SInt16 &outMark, Str255 outName);
  66.                             
  67.     virtual void            EventResume        (const EventRecord &inMacEvent);
  68.     virtual void            EventSuspend    (const EventRecord &inMacEvent);
  69.     
  70.     enum
  71.     {
  72.         cmd_Suspend = 1000,
  73.         cmd_Resume = 1001,
  74.         cmd_NextElement = 1002,
  75.         cmd_PrevElement = 1003,
  76.         cmd_AddElement = 1004,
  77.         cmd_DeleteElement = 1005,
  78.         cmd_UIStart = 1006,
  79.         cmd_UIConfigure = 1007,
  80.         cmd_UIStop = 1008,
  81.         cmd_ActivateKeyboard = 1009,
  82.         cmd_ActiveMouse = 1010,
  83.         cmd_DeactiveBoth = 1011
  84.     };
  85.     
  86.     enum
  87.     {
  88.         kIconSuiteID_XThrust = 128, 
  89.         kIconSuiteID_YThrust,
  90.         kIconSuiteID_ZThrust,
  91.         kIconSuiteID_Look,
  92.         kIconSuiteID_Fire,
  93.         kIconSuiteID_Thrust,
  94.         kIconSuiteID_Pause,
  95.         kIconSuiteID_Start
  96.     };
  97.  
  98.     
  99.     enum
  100.     {
  101.         kNumNeeds = 7
  102.     };
  103.     
  104.     ISpNeed mNeeds[kNumNeeds];
  105.     ISpElementReference mVirtualElements[kNumNeeds];
  106.     
  107.     void InitNeeds(void);
  108.     
  109. protected:
  110.  
  111.     virtual void        StartUp();        // overriding startup functions
  112. };